package entity;

import lombok.Data;

@Data
public class AiProductInfoDetailVo {
    private String id;

    /**
     * 商品标题
     */

    private String title;

    /**
     * 商品描述
     */
    private String intro;

    /**
     * 商品图片
     */
//    private String image;

    /**
     * 商品价格
     */
    private Double price;

    /**
     * 商品原价
     */
    private Double originalPrice;

    /**
     * 发货方式 0邮寄 1自提
     */
    private Integer postType;

    /**
     * 地址代码
     */
    private String adcode;

    /**
     * 省
     */
    private String province;

    /**
     * 市
     */
    private String city;

    /**
     * 区
     */
    private String district;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 创建时间
     */
    private Long createTime;
    private User userInfo;

    /**
     * 更新时间
     */
    private Long updateTime;
    //优惠
    private ProductVoucher productVoucher;

    public void copy(ProductInfoDetailVo productInfoDetailVo){
        this.id = productInfoDetailVo.getId();
        this.title = productInfoDetailVo.getTitle();
        this.intro = productInfoDetailVo.getIntro();
//        this.image = productInfoDetailVo.getImage();
        this.price = Double.valueOf(productInfoDetailVo.getPrice())/100;
        this.originalPrice = Double.valueOf(productInfoDetailVo.getOriginalPrice())/100;
        this.postType = productInfoDetailVo.getPostType();
        this.adcode = productInfoDetailVo.getAdcode();
        this.province = productInfoDetailVo.getProvince();
        this.city = productInfoDetailVo.getCity();
        this.district = productInfoDetailVo.getDistrict();
        this.status = productInfoDetailVo.getStatus();
        this.userId = productInfoDetailVo.getUserId();
        this.createTime = productInfoDetailVo.getCreateTime();
        this.updateTime = productInfoDetailVo.getUpdateTime();
    }
}
